<template>
	<view class="index">
		<view class="item" v-for="(item,index) in menus" :key="index" @click="selectMenu(item)">
			{{item.label}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				menus: [{
						label: "可滑动标记平面canvas",
						path: "/pages/canvas/canvas"
					},
					{
						label: "吉林省地图echarts",
						path: "/pages/map-echart/map-echart"
					},
					{
						label: "圆角梯形tabs",
						path: "/pages/tabs/tabs"
					},
					{
						label: "不超出窗口跟随气泡弹框",
						path: "/pages/tooltip/tooltip"
					},
				]
			};
		},
		methods: {
			selectMenu(item) {
				uni.navigateTo({
					url: item.path
				})
			}
		}
	};
</script>

<style lang="scss" scoped>
	.index {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 20rpx 0;
	}

	.item {
		padding: 20rpx 0;
	}
</style>